extends DirectoryResource Dav accessible

This is for non-learning rewards, ie competitions A RewardsFolder represents a Reward, and is a folder which can contain arbitrary content resources like images etc


Properties

Name Returns Notes Example
pointsSystem String The type of points system in use, or null: POINTS_PROFILE=points accumulate to the user; POINTS_ORG=points acculate to the user's primary organisation
myPointsTotal int Dav accessible If this is a profile points system, returns points balance of this user. If its an org profile system it returns all points earned by this user
#set( $rewardFolder = $page.find("/myRewards").child("PAPoints")
 ) My points: $rewardFolder.myPointsTotal
pointsBalance int Dav accessible Returns the points balance of this points system for the current user, or their primary organisation if this is an org points system
children ResourceList
name String The resource name of the reward, used in the url
entriesForUser List Get all entries (if any) for this user in this competition
userAttachmentHash String If the current user has uploaded a file as part of entering this reward, return a hash identifying the file. This can be used with /_hashes/files/{hash} to display the file
reward Reward
notes String The notes field of the reward, normally for internal use only
expiryDate Date
expiry Date
validForDays Integer Dav accessible
endDate Date
statusClass String Dav accessible
status String Dav accessible
numEntries long Dav accessible The total number of entries that have been made to this reward
numPendingEntries long Dav accessible The total number of pending entries that have been made to this reward
numEntriesForUser long Dav accessible
selectedGroups List Groups which have been enabled for this reward.
startDate Date
quiz Map For use by templating, will render it as JSON
userUploadMessage String
quizHtml String
details String
selectOrgType String
productCategories String
storeName String
promoProductCodes String
promoCategoryCodes String
promoEntryCodes String If provided, users will be required to enter one of these codes to activate the promotion
promoDiscountAmount BigDecimal
promoGiftSku String
productCategoriesList List
winners String
backgroundImage String
title String
actualAnswers Map Get all quiz answer correct values, keyed on the input name. input names are like "answer1", "answer2", etc
answerFieldNames List
pollResults Map Dav accessible Used for a poll with a single question, returns the answers selected and their counts
allPollResults List Dav accessible Used for multi question surveys, provides a list of answers and their counts
myAnswers Map Dav accessible Get answers for this reward for the current user
template String
imageHref String
imageId String
imageHash String
allSubmissions List
submissionAnswerKeys List
extraFields Map
myBalance Integer
myAvailableBalance Integer
myTransactions List Returns a list of PointsTransaction objects which represents all transactions (both debit and credit) for the current user on this reward store
terms String

Methods

Name Returns Notes Example
myPointsInfo ( max, since ) MyRewardInfo
Show a leaderboard of top 5 points earners for last 7 days


 #set($lastWeek = $formatter.addDays( $formatter.now, -7 ) ) #set(
 $allPoints = $reward.myPointsInfo(5, $lastWeek).myPoints) #if(
 $allPoints.size() > 0 ) #foreach( $points in $allPoints ) <tr>
 <td>$points.numPoints</td>
 <td>$points.awardedDate</td>
 <td>$points.reason</td> </tr> #end #end
myPointsInfo ( max, since, to ) MyRewardInfo
Show a leaderboard of top 5 points earners for last 7 days


 #set($lastWeek = $formatter.addDays( $formatter.now, -7 ) ) #set(
 $allPoints = $reward.myPointsInfo(5, $lastWeek).myPoints) #if(
 $allPoints.size() > 0 ) #foreach( $points in $allPoints ) <tr>
 <td>$points.numPoints</td>
 <td>$points.awardedDate</td>
 <td>$points.reason</td> </tr> #end #end
isInGroup ( ) boolean Is this reward associated with a group which contains the current user
#foreach($reward in $rewards) #if( $reward.isInGroup() ) <tr
 class="title"> <td class="title"><a
 class="text1"
 href="$formatter.percentEncode($reward.name)">$reward.title</a></td>
 <tr > #end #end
isSelected ( groupName ) boolean Returns true if the given Group object is selected for this reward
balance ( p ) Integer Find the balance for the given profile
availableBalance ( p ) Integer Find the balance for the given profile bean
myTransactions ( start, finish ) List

Ask a question, or offer an answer